// 车险表格 工具条
import { deepCopy } from '@/utils/tools'
import * as carTableTools from '@/components/table_tools/index'

let map = {

    newOrder: 'carCreatOrder'
    
};

export default (powerConf):any =>{
   let data = deepCopy(carTableTools)

    let keys = [];

    Object.keys(map).forEach(key =>{

        if(!powerConf[key]){
           keys = [...keys, ...map[key]]
        }
        
    })

    let keyStore = new Set(keys)
    let cache = []
    Object.keys(data).forEach(btnName =>{

        if(!keyStore.has(btnName)){
            cache.push(data[btnName])
        }
        
    })

    return cache
    
}